import request from '@/utils/request'

// 查询驾驶室管理列表
export function listGoodsParent(query) {
  return request({
    url: '/tms/goodsParent/list',
    method: 'get',
    params: query
  })
}

// 查询系列号下的所有零件号
export function getParentList(id) {
  return request({
    url: `/tms/goodsParent/listChild?parentGoodsNo=${id}`,
    method: 'get'
  })
}

// 查询驾驶室管理详细
export function getGoodsParent(id) {
  return request({
    url: '/tms/goodsParent/' + id,
    method: 'get'
  })
}

// 新增驾驶室管理
export function addGoodsParent(data) {
  return request({
    url: '/tms/goodsParent',
    method: 'post',
    data: data
  })
}

// 修改驾驶室管理
export function updateGoodsParent(data) {
  return request({
    url: '/tms/goodsParent',
    method: 'put',
    data: data
  })
}

// 删除驾驶室管理
export function delGoodsParent(id) {
  return request({
    url: '/tms/goodsParent/' + id,
    method: 'delete'
  })
}
